cmake_minimum_required(VERSION 2.8.12)

project(tproxy LANGUAGES C CXX)

set(CMAKE_C_STANDARD 99)





add_library( tproxy_api SHARED
    tproxy_api.cpp
)
add_executable( tproxy
    app.cpp
    client.cpp
    comm.cpp
    config.cpp
    env.cpp
    IDL_httpserver_conf.dsc.c
    IDL_httpserver_conf.dsc.LOG.c
    main.cpp
    monitor.cpp
    worker.cpp
)


target_include_directories(tproxy_api PUBLIC ${PROJECT_ROOT_DIR}/src/tproxy) 
target_link_libraries(tproxy_api PRIVATE  tproxy_util )
target_link_libraries(tproxy PRIVATE tproxy_api tproxy_util pthread ssl dl)

install(TARGETS tproxy_api DESTINATION lib)
install(TARGETS tproxy DESTINATION bin)
